﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/**
 * 伤害陷阱相关
 **/
public class DemageArea : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
    /**
     * 持续碰撞检测相关
     **/
    void OnTriggerStay2D (Collider2D other) {
        PlayerController pc = other.GetComponent<PlayerController>();
        if (pc != null) {
            pc.ChangeHealth(-1);
        }
    }
}
